<?php
$a = 1;

function test(&$b)
{
  $b = $b+1;
  return $b;
}
echo "a is => $a \n\n";
echo test($a), "\n\n";
echo "a is => $a \n\n";
